<html>
<meta charset="utf-8">
<head>
    <script type="text/javascript" src="asset/jquery/jquery.js"></script>
    <script type="text/javascript">

        $(document).ready(function(){

            $("#b01").click(function(){

                $.ajax({
                    crossDomain:true,
                    xhrFields: {
                        withCredentials: true
                    },
                    type:"POST",
                    contentType :"application/json; charset=utf-8",
                    url: ngConstant.interfaceHost + "admin/infousers/login",
                    dataType:"json",
                    data:JSON.stringify({
                        username: "1",
                        password: "1"
                    }),
                    success:function (res,xhr) {
                    console.log(res,xhr);



                    },
                    error:function () {

                    }
                })


            });

            $("#b02").click(
                function(){
                    $.ajax({
                        crossDomain:true,
                        xhrFields: {
                            withCredentials: true
                        },
                        type:"post",
                        contentType :"application/json; charset=utf-8",
                        url: ngConstant.interfaceHost + "admin/knowledgequestions",
                        dataType:"json",
                        data:JSON.stringify({
                            "dataSign": 0,
                            "description": "前端前端前端前端前端前端前端",
                            "price": "2",
                            "timeOutSubmit": "0",
                            "typeNames": "java",
                            "waitingTime": 0,
                            "title": "前端前端前端前端前端前端前端前端前端前端"

                        }),
                        success:function (res,xhr) {
                            console.log(res,xhr)
                        }
                    });
                });


            $("#b03").click(function(){

                $.ajax({
                    crossDomain:true,
                    xhrFields: {
                        withCredentials: true
                    },
                    type:"GET",
                    contentType :"application/json; charset=utf-8",

                    url: ngConstant.interfaceHost + 'admin/infousers/info',

                    dataType:"json",


                    success:function (res,xhr) {
                        console.log(res,xhr);

                        console.log(res.data.data.content);

                    },
                    error:function () {

                    }
                })


            });


            $("#b04").click(function(){

                $.ajax({
                    crossDomain:true,
                    xhrFields: {
                        withCredentials: true
                    },
                    type:"GET",
                    contentType :"application/json; charset=utf-8",

                    url: ngConstant.interfaceHost + 'admin/knowledgequestions/info',

                    dataType:"json",


                    success:function (res,xhr) {
                        console.log(res,xhr);



                    },
                    error:function () {

                    }
                })


            });
        });






    </script>

</head>
<body>


<button id="b01" type="button">111</button>
<button id="b02" type="button">222</button>
<button id="b03" type="button">333</button>
<button id="b04" type="button">444</button>
</body>
</html>
